package text;

import cn.cvs.service.impl.AuctionServiceImpl;
import cn.cvs.service.impl.AuctionrecordServiceImpl;
import cn.cvs.service.impl.AuctionuserServiceImpl;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Text {
    @Test
    public void p(){
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        AuctionServiceImpl a1 = context.getBean("auctionService",AuctionServiceImpl.class);
        AuctionuserServiceImpl a2 = context.getBean("auctionuserService", AuctionuserServiceImpl.class);
        AuctionrecordServiceImpl a3 = context.getBean("auctionrecordService", AuctionrecordServiceImpl.class);
        System.out.println("拍卖品总数据："+a1.count());
        System.out.println("用户总数据："+a2.count());
        System.out.println("竞拍记录总数据："+a3.count());
    }
}
